<!-- html -->
<template>
  <!-- 多个参数 -->
  <span class="span2">text2：</span>
  <input class="input1" type="text" :value="text2"
    @input="emit('update:text2', (<HTMLInputElement>$event.target).value)">
  <span class="span2">text3：</span>
  <input class="input1" type="text" :value="text3"
    @input="emit('update:text3', (<HTMLInputElement>$event.target).value)">
</template>

<!-- js或ts -->
<script lang="ts">
export default {
  name: 'vModelTest1Child2'
}
</script>

<!-- js或ts -->
<script setup lang="ts">
//数据
//接收参数
defineProps(['text2', 'text3'])
//声明事件
let emit = defineEmits(['update:text2', 'update:text3'])
</script>

<!-- 样式 -->
<style scoped></style>